/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package verins.DAO;

import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.Query;

/**
 *
 * @author hectdx
 */
public class TipoEmpadronamientoDAO {
    
    
     public List finAll(){
        List lista=null;
        try{
            
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("verinsPU");
            EntityManager em = emf.createEntityManager();
            Query query=em.createNamedQuery("Tipoempadronamiento.findAll");
            
            lista=query.getResultList();
            
            em.getTransaction().commit();
            em.close();    
            emf.close();
            
            return lista;
            
        }catch(Exception ex){

        }
        return lista;
    }
}
